#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
	int n = 0;
	int a = 0;
	int old = 0;
	scanf("%d", &n);
	while (n!=1)
	{
		if (n % 2 == 0)
		{
			old = n;
			n = n / 2;
			a = n;
			printf("%d/2=%d\n", old, a);
		}
		else
		{
			old = n;
			n = 3 * n + 1;
			a = n;
			printf("%d*3+1=%d", old, a);
		}
	}
	printf("END");
	return 0;
}